import { computed, effect, signal } from "alien-signals";

const state = signal({ count: 0 });

const doubleState = computed(() => ({ count: state().count * 2 }));

effect(() => {
  console.log(state());
});

// {
//   state({ count: state().count + 1 });
//   state({ count: state().count + 2 });
//   state({ count: state().count + 3 });
// }

state().count += 1;
state().count += 2;
state().count += 3;
console.log(state());
